tools/firmware: Use generic subdirs rules.
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 25 Mar 2008 09:51:03 +0000 (09:51 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 25 Mar 2008 09:51:03 +0000 (09:51 +0000)
Signed-off-by: Bastian Blank <waldi@debian.org>
tools/firmware/Makefile
tools/firmware/hvmloader/Makefile
tools/firmware/rombios/32bit/Makefile
tools/firmware/rombios/Makefile

index 67fee874739e83873782e42a8c90e3b272f8609b..b2d7f532c9f45bff92edc6c71660cb1eb20af4c6 100644 (file)
@@ -7,7 +7,7 @@ TARGET      := hvmloader/hvmloader
 INST_DIR := $(DESTDIR)/usr/lib/xen/boot
 
 SUBDIRS :=
-SUBDIRS += rombios rombios/32bit
+SUBDIRS += rombios
 SUBDIRS += vgabios
 SUBDIRS += extboot
 #SUBDIRS += etherboot
@@ -21,9 +21,7 @@ all:
        echo "(visit http://www.cix.co.uk/~mayday for more information)"; \
        echo "***********************************************************"; \
        else \
-       for subdir in $(SUBDIRS); do \
-               $(MAKE) -C $$subdir $@; \
-       done; \
+       $(MAKE) subdirs-$@; \
        fi
 
 
@@ -33,7 +31,4 @@ install: all
        [ ! -e $(TARGET) ] || $(INSTALL_DATA) $(TARGET) $(INST_DIR)
 
 .PHONY: clean
-clean: 
-       @set -e; for subdir in $(SUBDIRS); do \
-               $(MAKE) -C $$subdir $@; \
-       done
+clean: subdirs-clean
index 6187480586b78d58ff97843b802031de5cdbeab8..533fa81e7234167dbe464af9d7d79a3e6b5ff5d5 100644 (file)
@@ -23,6 +23,8 @@ XEN_ROOT = ../../..
 CFLAGS :=
 include $(XEN_ROOT)/tools/Rules.mk
 
+SUBDIRS := acpi
+
 # The HVM loader is started in 32-bit mode at the address below:
 LOADADDR = 0x100000
 
@@ -38,7 +40,7 @@ SRCS = hvmloader.c mp_tables.c util.c smbios.c 32bitbios_support.c
 OBJS = $(patsubst %.c,%.o,$(SRCS))
 
 .PHONY: all
-all: hvmloader
+all: subdirs-all hvmloader
 
 hvmloader: roms.h acpi/acpi.a $(SRCS)
        $(CC) $(CFLAGS) -c $(SRCS)
@@ -46,10 +48,6 @@ hvmloader: roms.h acpi/acpi.a $(SRCS)
        $(OBJCOPY) hvmloader.tmp hvmloader
        rm -f hvmloader.tmp
 
-.PHONY: acpi/acpi.a
-acpi/acpi.a:
-       $(MAKE) -C acpi
-
 roms.h: ../rombios/BIOS-bochs-latest ../vgabios/VGABIOS-lgpl-latest.bin ../vgabios/VGABIOS-lgpl-latest.cirrus.bin ../etherboot/eb-roms.h ../extboot/extboot.bin
        sh ./mkhex rombios ../rombios/BIOS-bochs-latest > roms.h
        sh ./mkhex vgabios_stdvga ../vgabios/VGABIOS-lgpl-latest.bin >> roms.h
@@ -58,7 +56,6 @@ roms.h: ../rombios/BIOS-bochs-latest ../vgabios/VGABIOS-lgpl-latest.bin ../vgabi
        sh ./mkhex extboot ../extboot/extboot.bin >> roms.h
 
 .PHONY: clean
-clean:
+clean: subdirs-clean
        rm -f roms.h acpi.h
        rm -f hvmloader hvmloader.tmp *.o
-       $(MAKE) -C acpi clean
index dc8c32b42006a6a7fc87332fafb9b57218d6437f..553fe8d1b26e2e9c6a1ca3b454dddfe7110b08df 100644 (file)
@@ -18,20 +18,12 @@ MODULES = tcgbios/tcgbiosext.o
 
 .PHONY: all subdirs clean
 
-subdirs:
-       @set -e; for subdir in $(SUBDIRS); do \
-               $(MAKE) -C $$subdir all; \
-       done;
+all: subdirs-all $(TARGET)
 
-all: $(TARGET)
-
-clean:
+clean: subdirs-clean
        rm -rf *.o $(TARGET)
-       @for subdir in $(SUBDIRS); do \
-               $(MAKE) -C $$subdir $@; \
-       done;
 
-$(TARGET): subdirs 32bitbios.o util.o
+$(TARGET): 32bitbios.o util.o
        $(LD) $(LDFLAGS_DIRECT) -s -r 32bitbios.o $(MODULES) util.o -o 32bitbios_all.o
        @nm 32bitbios_all.o |                                \
          egrep '^ +U ' >/dev/null && {                      \
index 7fae701a9d8ac359d9b4207ff877404a6fa468ce..dcf2143c6cf8453f3409d8c3894c638b40dde67c 100644 (file)
@@ -1,12 +1,16 @@
+XEN_ROOT = ../../..
+include $(XEN_ROOT)/tools/Rules.mk
+
+SUBDIRS := 32bit
 
 .PHONY: all
-all: bios
+all: subdirs-all bios
 
 .PHONY: bios
 bios: biossums BIOS-bochs-latest
 
 .PHONY: clean
-clean:
+clean: subdirs-clean
        rm -f  *.o *.a *.s rombios.bin _rombios*_.c
        rm -f  as86-sym.txt ld86-sym.txt 
        rm -f  rombios*.txt rombios*.sym usage biossums